package zwp.example.demo1.demo_thread;

import org.springframework.stereotype.Component;

/**
 * 继承Thread创建线程
 * @author zwp14
 */
@Component
public class MyThread extends Thread{
    @Override
    public void run() {
        Thread thread = Thread.currentThread();
        String name = thread.getName();
        System.out.println("继承Thread创建线程-----"+name);
    }
}
